<div class="banner-content">
    <blockquote class="layui-elem-quote">
        <button class="layui-btn create-item"><i class="layui-icon">&#xe654;</i>创建轮播</button>
    </blockquote>
    <div class="banner-table"></div>
    <script type="text/html" id="bannerForm">
        <form class="layui-form padding-5 layui-dialog banner-form">
            <div class="layui-form-item">
                <label class="layui-form-label required">标题：</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required lay-verify="required" placeholder="请输入标题"
                           autocomplete="off" value="{{d.data.title||''}}"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">链接类型：</label>
                <div class="layui-input-block">
                    <select name="urlType">
                        <option value="01" {{# if(d.data.urlType=="01"){}}selected{{#}}}>内链</option>
                        <option value="02" {{# if(d.data.urlType=="02"){}}selected{{#}}}>外链</option>

                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">链接：</label>
                <div class="layui-input-block">
                    <input type="text" name="url" required lay-verify="required|bannerUrl" placeholder="请输入链接"
                           autocomplete="off" value="{{d.data.url||''}}"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">轮播图：</label>
                <div class="layui-input-block">
                    <div class="logo-container">
                        <input type="hidden" name="image" required lay-verify="required"
                               autocomplete="off" value="{{d.data.image||''}}"
                               class="layui-input">
                        <div class="logo-img-container">
                            {{# if(d.data.image){}}
                            <img src="{{d.data.image||''}}" class="logo-item add-image"/>
                            {{#}else{}}
                            <i class="layui-icon logo-placeholder add-image">&#xe60d;</i>
                            {{#}}}
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">显示顺序：</label>
                <div class="layui-input-block">
                    <input type="number" name="sort" required lay-verify="required|positiveInteger"
                           placeholder="请输入显示顺序"
                           autocomplete="off" value="{{d.data.sort||''}}"
                           class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">类别：</label>
                <div class="layui-input-block">
                    <select name="type">
                        <option value="02" {{# if(d.data.type=="02"){}}selected{{#}}}>头条</option>
                        <option value="03" {{# if(d.data.type=="03"){}}selected{{#}}}>对话</option>
                        <option value="04" {{# if(d.data.type=="04"){}}selected{{#}}}>走势</option>
                        <option value="05" {{# if(d.data.type=="05"){}}selected{{#}}}>前沿</option>
                        <option value="06" {{# if(d.data.type=="06"){}}selected{{#}}}>学院</option>
                        <!--<option value="04" {{# if(d.data.type=="04"){}}selected{{#}}}>直播</option>-->
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">状态：</label>
                <div class="layui-input-block">
                    <select name="status">
                        <option value="00" {{# if(d.data.status=="00"){}}selected{{#}}}>禁用</option>
                        <option value="01" {{# if(d.data.status=="01"){}}selected{{#}}}>启用</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn save" lay-submit lay-filter="{{d.model}}">保存</button>
                    <button type="reset" class="layui-btn">重置</button>
                </div>
            </div>
            <input type="hidden" name="id" value="{{d.data.id||''}}"/>
        </form>
    </script>
</div>

<script type="text/javascript" src="../js/banner.js"></script>